package com.example.edu.school.user.impl;

import com.example.edu.school.user.Visitable;
import com.example.edu.school.visitor.Visitor;
import lombok.Data;

@Data
public class Teacher implements Visitable {

    public Teacher(String name, String identity) {
        this.name = name;
        this.identity = identity;
    }

    public String enrollmentRate() {
        return Math.random() * 100 + "%";
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    public String name;

    public String identity;
}
